<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Test02</title>
    <script src="https://unpkg.com/vue/dist/vue.js" type="text/javascript"></script>
</head>
<body>

<div id="app">
    <a href="https://www.baidu.com">百度01</a>
    <br/>
    <a v-bind:href="baidu_url">百度02</a>
    <br/>
    <a v-bind:href="baidu_url" v-on:click="clickBaidu">百度03</a>
    <br/>
    <a v-bind:href="baidu_url" v-on:click.prevent="clickBaidu">百度04</a>
    <br/>
    <a v-bind:[bind_attr]="baidu_url" v-on:[event_name]="clickBaidu">百度05</a>
    <br/>
    <a :[bind_attr]="baidu_url" @[event_name]="clickBaidu">百度06</a>
</div>

<script>
    let vm = new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue!',
            dhtml: '<span style="color: red">HTML Template</span>',
            dstyle: 'color: green',
            dcolor: 'red',
            ok: true,
            baidu_url: 'https://www.baidu.com',
            bind_attr: 'href',
            event_name: 'click'
        },
        methods: {
            clickBaidu: function () {
                alert("Baidu");
            }
        }
    });

</script>

</body>
</html>